package com.ssm.zyn.action;

import com.ssm.zyn.eo.LimitEOpage;
import com.ssm.zyn.service.LimitpService;
import com.ssm.zyn.tool.ResponseMessage;
import com.ssm.zyn.tool.Result;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

import java.util.HashMap;
import java.util.List;
import java.util.Map;

/**
 * 对外提供数据服务接口
 */
@Api(tags="Limitp")
@RestController
@CrossOrigin
public class LimitpController {
    @Autowired
    private LimitpService limitService;
    @ApiOperation(value = "根据条件获取权限信息")
    @RequestMapping(value = "/getLimitAll",produces = "application/json;charset=utf-8",method = RequestMethod.POST)
    public ResponseMessage getLimitAll(@RequestBody LimitEOpage limitEOpage){
        Map<String, List> map=new HashMap<>();
        List<LimitEOpage> listLimit=limitService.getWhereAll(limitEOpage);
        map.put("list",listLimit);
        return Result.success("200",map);
    }
}
